So-called multi fuel engines are known that can operate with different types of fuel and are based on the Otto principle. In this kind of an engine an air-fuel mixture is compressed before an externally initiated ignition. The compression can also result in spontaneous ignition before the externally initiated ignition, which is something that is not desirable. In general, different fuels exhibit different knock resistances, i.e. their mixture with air can be compressed by different amounts before resulting in spontaneous ignition. In order to use the fuel ideally, it is preferable that the fuel be compressed as much as possible before the externally initiated ignition. The geometric compression of an engine is, however, an unalterable parameter that is usually determined by its design. This kind of an engine can thus only be ideally designed and set for one fuel with a specific knock resistance. Operating this engine with another fuel possessing lower knock resistance could result in knocking whereby the engine will sustain damage.